<?php

namespace App\Http\Controllers\Index;

use App\Http\Controllers\Controller;
use Illuminate\Http\Request;

class IndexController extends Controller
{
    public function index(Request $request){
       if ($request->isMethod('get')){
           echo '是get请求';
       }else{
           echo '是post请求';
       }
    }


    public function api(){
        echo '这里是api调用';
    }
}
